package com.kaishengit.web;


import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class ShowDataServlet extends HttpServlet {

	private static final long serialVersionUID = 1L;
	@Override
	protected void service(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		/*"showData.jspx?name="+encodeURIComponent(datepickername)
			+"focusedInput2"+focusedInput2+"focusedInput3"+focusedInput3+"focusedInput4"+focusedInput4
			+"focusedInput5"+focusedInput5+"focusedInput6"+focusedInput6;*/
		
		String dataname=request.getParameter("name");
		String focusedInput2=request.getParameter("focusedInput2");
		String focusedInput3=request.getParameter("focusedInput3");
		String focusedInput4=request.getParameter("focusedInput4");
		String focusedInput5=request.getParameter("focusedInput5");
		String focusedInput6=request.getParameter("focusedInput6");
		
		
		
		response.setContentType("text/xml;charset=UTF-8");
		PrintWriter out = response.getWriter();
		
		out.print("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
		out.print("<data>");
		
		out.print("<recode>"+dataname+"</recode>");
		out.print("<recode>"+focusedInput2+"</recode>");
		out.print("<recode>"+focusedInput3+"</recode>");
		out.print("<recode>"+focusedInput4+"</recode>");
		out.print("<recode>"+focusedInput5+"</recode>");
		out.print("<recode>"+focusedInput6+"</recode>");
		
		out.print("</data>");
		
	}

}
